
#include <stdio.h>
#include "funcontainer.h"

int fun2(int a,int b)
{
    printf("fun2 %u %u!\n",a,b);
    return 100;
}

int fun1(int a,int b)
{
    printf("fun1 %u %u!\n",a,b);
    return 200;
}

int main()
{
	int ret;
    int len;
	FUNCON_S bak;
	
	ret = FunConAdd((void *)fun1,&bak,(void *)fun2);
	if(ret)
	{
		return 1;
	}

	ret = fun1(1,2);
	
	printf(" fun1 = %u \n",ret);
	
	ret = FunConRemove((void *)fun1,&bak,(void *)fun2);
	if(ret)
	{
		return 1;
	}
	
	ret = fun1(2,3);
	
	printf(" fun1 = %u \n",ret);
    return 0;
}
